unit database_base;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, database, languagehelper;

type

  { TDatabaseBaseFrame }

  TDatabaseBaseFrame = class(TFrame)
    procedure Init; virtual; abstract;
  private

  public
    Db: TDatabase;
    procedure SetDatabase(ADb: TDatabase);
    procedure UpdateLanguage(Code: String); virtual;
  end;

implementation

{$R *.lfm}

procedure TDatabaseBaseFrame.SetDatabase(ADb: TDatabase);
begin
  Db := ADb;
  Init;
end;

procedure TDatabaseBaseFrame.UpdateLanguage(Code: String);
begin
  if IsLanguageRtl(Code) then begin
    FlipChildren(True);
  end;
end;

end.

